package com.springmvc.test;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.util.Arrays;
import java.util.Date;
import java.util.List;

import org.junit.Test;

public class testL {

	@Test
	public void testBidInteger() {
		BigDecimal bd = BigDecimal.ZERO;
		System.out.println(bd);
		BigInteger bi = BigInteger.ONE;
		bi = bi.add(bi);
		System.out.println(bi);
	}
	
	@Test
	public void test() {
		List<String> list = Arrays.asList("A","B","C");
		list.forEach(l -> System.out.println(l));
		new Thread(() -> System.out.println("Hello world !")).start();  
		list.stream()
			.filter((l) -> l.contains("A"))
			.forEach(l -> System.out.println(l));
	}

	@Test
	public void testDate() {
		Date date = new Date();
		LocalDate ld = LocalDate.now();
		date = java.sql.Date.valueOf(ld);
		System.out.println(date);
		
		
	}
	
	public static void main(String[] args) {
		String s = "20180305";
		SimpleDateFormat f = new SimpleDateFormat("yyyyMMdd");
		String ss = s.substring(0,6);
		ss = ss + "01";
		
		System.out.println(ss);
		
	}
	
}
